<?php
include ('getaccesstoken.php');
$access_token = getaccesstoken();
$url = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=".$access_token;
$ch = curl_init();
curl_setopt( $ch , CURLOPT_URL , $url);
$content=curl_exec($ch);
curl_close($ch);
$jsoninfo=json_decode($content,true);
if($jsoninfo['errcode']==0)
	{
		echo $jsoninfo;
	}
else
	{
    	echo "查询菜单失败";
	}	
?>